package JavaBasics;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

/**
 * Created by IntelliJ IDEA.
 * User: Stas
 * Date: 13.10.12
 * Time: 13:42
 * To change this template use File | Settings | File Templates.
 */
public class CalendarSeeker {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String inputString = null;

        try {
            inputString = br.readLine();
        } catch (IOException e) {
            e.printStackTrace();
        }
        

        SimpleDateFormat formatter = new SimpleDateFormat("dd MMMM yyyy", Locale.US);
        Date date = formatter.parse(inputString);

        int day = date.getDay();

        if(day == 0)
            System.out.println("Sunday");
        if(day == 1)
            System.out.println("Monday");
        if(day == 2)
            System.out.println("Thusday");
        if(day == 3)
            System.out.println("Wednesday");
        if(day == 4)
            System.out.println("Thursday");
        if(day == 5)
            System.out.println("Friday");
        if(day == 6)
            System.out.println("Saturday");

    }
}
